import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutterdemo/column/column.dart';
import 'package:flutterdemo/pages/Search.dart';

class Home extends StatefulWidget {
  const Home({Key? key}) : super(key: key);

  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return ListView(
      children: [
        RaisedButton(
          onPressed: () {
            Navigator.of(context).push(
                MaterialPageRoute(builder: (context) => SearchPage("跳转传值")));

            // Navigator.
          },
          child: Text("跳转搜索界面"),
        ),
        RaisedButton(
          onPressed: () {
            Navigator.pushNamed(context, '/aroute',
                arguments: {'id': "命名路由传值"});

            // Navigator.
          },
          child: Text("通过表单名跳转"),
        ),
        RaisedButton(
          onPressed: () {
            /*  Navigator.pushNamed(context, '/aroute',arguments: {
              'id':"命名路由传值"
            });*/
            Navigator.pushNamed(context, '/loginroute');

            // Navigator.
          },
          child: Text("跳转到登陆页面"),
        ),
        RaisedButton(
          onPressed: () {
            /*  Navigator.pushNamed(context, '/aroute',arguments: {
              'id':"命名路由传值"
            });*/
            Navigator.pushNamed(context, '/registerfrist');

            // Navigator.
          },
          child: Text("跳转到注册页面"),
        ),
        RaisedButton(
          onPressed: () {
            /*  Navigator.pushNamed(context, '/aroute',arguments: {
              'id':"命名路由传值"
            });*/
            Navigator.pushNamed(context, '/appBarDemo');

            // Navigator.
          },
          child: Text("跳转到appbar"),
        ),
        RaisedButton(
          onPressed: () {
            /*  Navigator.pushNamed(context, '/aroute',arguments: {
              'id':"命名路由传值"
            });*/
            Navigator.pushNamed(context, '/tabBarControl');

            // Navigator.
          },
          child: Text("tabBarControl"),
        ),
        RaisedButton(
          onPressed: () {
            /*  Navigator.pushNamed(context, '/aroute',arguments: {
              'id':"命名路由传值"
            });*/
            Navigator.pushNamed(context, '/textFiled');

            // Navigator.
          },
          child: Text("表单演示"),
        ),
        RaisedButton(
          onPressed: () {
            /*  Navigator.pushNamed(context, '/aroute',arguments: {
              'id':"命名路由传值"
            });*/
            Navigator.pushNamed(context, '/timePage');

            // Navigator.
          },
          child: Text("时间选择器"),
        ),
      ],
    );
  }
}
